<?php

namespace app\controller;

use app\BaseController;
use think\Request;
use think\facade\View;

class Page extends BaseController
{

    protected $request;

    //注入
    public function _construc(Request $request)
    {
        $this->request = $request;
    }

    public function index()
    {
        return View::fetch();
    }


    /**
     * https://doc.thinkphp.cn/v8_0/response_output.html
     */
    public function submit()
    {
        $data = ['name' => 'thinkphp', 'status' => '1'];
        return json($data);
    }
    
}
